import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
export default new Vuex.Store({
    state: {
        city:"武汉"
    },
    mutations: {
        changeStateCity(state, val) {
            state.city = val;
            console.log(state)
        }
    },
    actions: {
        changeCity(ctx, val) {
            console.log(ctx);
            console.log(val);
            ctx.commit("changeStateCity", val);
        }
    },
    modules: {
        
    }
})